import React from 'react' // 引入react
import {Route, IndexRoute} from 'react-router';

import HomeContainer from './home/containers/HomeContainer'

//进入到该路由后、执行的方法
function routeEnter(){
    alert(1)
    //document.location.href="http://www.baidu.com"
}


export default(
    <Route path="/" component={HomeContainer} onEnter={()=>{routeEnter()}}>
        <Route path="/home" component={HomeContainer}  onEnter={()=>{alert(2)}}/>
    </Route>
)
